package lab02.test06;

/**
 * Created by JAVA on 2017/10/15.
 */
public class Ladder {//Ladder类具有类型double的上底、下底、高、面积属性，具有返回面积的功能。
    private double up,down,high,area;
    public Ladder(){}
    public Ladder(double up,double down,double area,double high){
        this.area=area;
        this.down=down;
        this.high=high;
        this.up=up;
    }
    public double getUp() {
        return up;
    }
    public void setUp(double up) {
        this.up = up;
    }
    public double getDown() {
        return down;
    }
    public void setDown(double down) {
        this.down = down;
    }
    public double getHigh() {
        return high;
    }
    public void setHigh(double high) {
        this.high = high;
    }
    public double getArea(double up,double down,double high) {
        area=(up+down)*high/2;
        return area;
    }
    public void setArea(double area) {
        this.area = area;
    }
}
